package com.hwtx.form.domain.vo;

import lombok.Builder;
import lombok.Getter;

@Getter
@Builder
public class ResultVo {
    private String msg;
    private boolean success;
    private Object data;
    private String type;

    public static ResultVo success() {
        return ResultVo.builder().success(true).build();
    }

    public static ResultVo success(Object data) {
        return ResultVo.builder().success(true).data(data).build();
    }

    public static ResultVo fail(String msg) {
        return ResultVo.builder().success(false).msg(msg).build();
    }
}
